//编写杨辉三角，实现动态输入
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    cout << "Please enter line number:" << endl;
    int n;
    cin >> n;
    int space = n;//前面的空格数量
    int count = 1;//打印的字符数 初始化
    for (int i = 1; i <= n; i++)//行
    {
        cout << setw(space) << " ";
        for (int j = 1; j <= count;j++)//每行打印
        {
            cout << "B";
        }
        count = count + 2;//打印字数数增加
        space = space - 1;//空格减少
        cout << endl;//换行
    }
    system("pause");
}